﻿/*-----------------------------------------------
// File: UITriggerTab.cs
// Description: 
// Author: Shaobing	492057342@qq.com
-----------------------------------------------*/
using UnityEngine;
using System.Collections;

public class UITriggerTab : MonoBehaviour {

    public UISprite smallIcon;
    public string triggerIconSpriteName;
    public string UntriggerIconSpriteName;
    public UISprite tagDi;

    public bool isTrigger;

    public void Trigger() {
        isTrigger = true;
        if (smallIcon != null)
            smallIcon.spriteName = triggerIconSpriteName;
        if (tagDi != null)
            tagDi.gameObject.SetActive(true);
    }

    public void UnTrigger() {
        isTrigger = false;
        if (smallIcon != null)
            smallIcon.spriteName = UntriggerIconSpriteName;
        if (tagDi != null)
            tagDi.gameObject.SetActive(false);
    }

}
